import request from '@/utils/request'

/**
 * 类别
接口：http://47.94.168.45:9002/prod-api/dict/energyType/list
接口类型：post
参数：{}
展示字段：energyName:"电"

标签
接口：http://47.94.168.45:9002/prod-api/archives/topologymenu/list
接口类型：post
参数：{menuId：110}
展示字段：topologyName: "100车间建筑"

节点树
接口：http://47.94.168.45:9002/prod-api/global/topologyTree/listByEnergyType
参数：{"energyType":1,"topologyId":"abcedcb745e242cdb63b806cf3cb9cb0"}
类型：post
展示文本：name

查询图表及表格数据
接口：http://47.94.168.45:9002/prod-api/voerall/cost/getContrast
类型：post
参数：
月、环比
{
    "treeNodeId": "326745fb596d4b82a00434c0bc7b2757",
    "beginCollectTime": "2024-02-01 00:00:00",
    "endCollectTime": "2024-02-29 24:00:00",
    "type": "",
    "name": "day",
    "energyType": 1,
    "ont": "y",
    "time": "time",
    "beginCollectTime1": "2024-01-01 00:00:00",
    "endCollectTime1": "2024-01-31 24:00:00"
}
日、环比
{
    "treeNodeId": "326745fb596d4b82a00434c0bc7b2757",
    "beginCollectTime": "2024-02-01 00:00:00",
    "endCollectTime": "2024-02-29 24:00:00",
    "type": "",
    "name": "day",
    "energyType": 1,
    "ont": "y",
    "time": "time",
    "beginCollectTime1": "2024-01-01 00:00:00",
    "endCollectTime1": "2024-01-31 24:00:00"
}
年、环比
{
    "treeNodeId": "326745fb596d4b82a00434c0bc7b2757",
    "beginCollectTime": "2025-01-01 00:00:00",
    "endCollectTime": "2025-12-31 24:00:00",
    "type": "",
    "name": "month",
    "energyType": 1,
    "ont": "n",
    "time": "time",
    "beginCollectTime1": "2024-01-01 00:00:00",
    "endCollectTime1": "2024-12-31 24:00:00"
}
 * */

// 电
export function energyType(query) {
  return request({
    url: '/prod-api/dict/energyType/list',
    method: 'post',
    data: query
  })
}

// 车间
export function topologymenu(data) {
  return request({
    url: '/prod-api/archives/topologymenu/list',
    method: 'post',
    data: data
  })
}

// 节点树
export function topologyTree(data) {
  return request({
    url: '/prod-api/global/topologyTree/listByEnergyType',
    method: 'post',
    data: data
  })
}

// 表单查询
export function getContrast(data) {
  return request({
    url: '/prod-api/voerall/cost/getContrast',
    method: 'post',
    data: data
  })
}
